package com.heima.search.repository;

import com.heima.search.entity.ApAssociateWords;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.Date;
import java.util.List;

public interface ApAssociateWordsRepository extends MongoRepository<ApAssociateWords,String> {

    List<ApAssociateWords> findByAssociateWordsStartingWith(String word);

    List<ApAssociateWords> findTop10ByAssociateWordsStartingWithOrderByCreatedTimeDesc(String word);
}
